package com.todod.entity;

import java.util.List;
import java.util.Map;

/**
 * 排序条件
 * 
 * @author hyw
 *
 */
public class EsQuery {

	private int page; // 页码

	private int limit; // 每页条数

	private String key; // 查询关键字

	private String type; // 查询关键字

	private Map<String, String> params; // 筛选条件

	private List<OrderBy> orders; // 排序条件

	private List<String> highlights; // 高亮
	private Map<String, String> terms; // terms条件

	public Map<String, String> getTerms() {
		return terms;
	}

	public void setTerms(Map<String, String> terms) {
		this.terms = terms;
	}

	public int getPage() {
		return page;
	}

	public void setPage(int page) {
		this.page = page;
	}

	public int getLimit() {
		if (limit == 0) {
			limit = 10;
		}
		return limit;
	}

	public void setLimit(int limit) {
		this.limit = limit;
	}

	public String getKey() {
		return key;
	}

	public void setKey(String key) {
		this.key = key;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public Map<String, String> getParams() {
		return params;
	}

	public void setParams(Map<String, String> params) {
		this.params = params;
	}

	public List<OrderBy> getOrders() {
		return orders;
	}

	public void setOrders(List<OrderBy> orders) {
		this.orders = orders;
	}

	public List<String> getHighlights() {
		return highlights;
	}

	public void setHighlights(List<String> highlights) {
		this.highlights = highlights;
	}

}
